package demo.spring.annotation;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author: tyzhang
 * @Description:
 * @Date: Created in 15:30 2018/3/18
 */
public class A {
    private B bClass;

    @Autowired
    public void setBClass(B bClass){
        this.bClass = bClass;
        System.out.println("通过set的方式注入B类");
    }

    public A(){
        System.out.println("A类");
    }
}
